package cn.common.annotation;

import cn.common.enums.EBusinessNameEnum;
import cn.common.enums.RetryLevel;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2022/12/21
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface BasicRetry {
    RetryLevel[] retryPolicys() default {RetryLevel.TWO, RetryLevel.THREE, RetryLevel.FIVE};

    boolean enableDelayRetry() default false;

    int retryMaxCount() default 3;

    long retryIntervel() default 2000L;

    EBusinessNameEnum businessName() default EBusinessNameEnum.BASIC;
}
